package com.zxw.java基础.数组;

import cn.hutool.json.JSONUtil;

/**
 * @projectName: util-cloud
 * @package: com.zxw.java基础.数组
 * @className: Test
 * @author: zhangxuewei
 * @description:
 * @date: 2025/10/16 16:52
 * @version: 1.0
 */
public class Test {
    public static void main(String[] args) {
        Ps ps = new Ps();
        Property property = new Property();
        property.setVal("");
        property.setName("bydh");

        Property property2 = new Property();
        property2.setVal("zxw");
        property2.setName("shr");

        Property[] parr = {property, property2};
        ps.setProperties(parr);

        Property bydhp = new Property();
        Property[] sec = ps.getProperties();
        for (Property property1 : sec) {
            if (property1.getName().equals("bydh")) {
                bydhp = property1;
            }
        }


        bydhp.setVal("xxxxxxx");

        System.out.println(JSONUtil.toJsonStr(ps));

    }


}
